home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2006 May / PCWMAY06.iso / Software / Freeware / First Page 2006 3.00 / fp2006-final-3.00-setup.exe / {app} / Iscripts / Links / home-hot-key.izs < prev    next >
Text File  |  2005-08-07  |  1KB  |  60 lines

  1. <!NOWIZARD>
  2.  
  3. <!TITLE>Home hot key
  4. <!/TITLE>
  5.  
  6. <!DESCRIPTION>A script that jumps back "home" when "h" is pressed. In other words, a script that allows you to specify a target url to go to when "h" is pressed.
  7. <!/DESCRIPTION> 
  8.  
  9. <!CATEGORY>links<!/CATEGORY>
  10.  
  11. <!SCRIPT>
  12. <!-- START OF SCRIPT -->
  13. <script language="JavaScript1.2">
  14. <!--
  15.  
  16. if (document.layers)
  17. document.captureEvents(Event.KEYPRESS)
  18. function backhome(e){
  19. var targeturl="http://www.javascriptkit.com"
  20. if (document.layers||document.getElementById&&!document.all){
  21. if (e.which==104||e.which==72)
  22. window.location=targeturl
  23. }
  24. else if (document.all){
  25. if (event.keyCode==104||event.keyCode==72)
  26. window.location=targeturl
  27. }
  28. }
  29. document.onkeypress=backhome
  30. //-->
  31. </script>
  32. <!-- END OF SCRIPT -->
  33. <!/SCRIPT>
  34.  
  35. <!PREVIEW>
  36. <!-- START OF SCRIPT -->
  37.  
  38. <script language="JavaScript1.2">
  39. <!--
  40.  
  41. if (document.layers)
  42. document.captureEvents(Event.KEYPRESS)
  43. function backhome(e){
  44. var targeturl="http://www.javascriptkit.com"
  45. if (document.layers||document.getElementById&&!document.all){
  46. if (e.which==104||e.which==72)
  47. window.location=targeturl
  48. }
  49. else if (document.all){
  50. if (event.keyCode==104||event.keyCode==72)
  51. window.location=targeturl
  52. }
  53. }
  54. document.onkeypress=backhome
  55. //-->
  56. </script>
  57. <!-- END OF SCRIPT -->
  58. <!/PREVIEW>
  59.  
  60. <!RELATED>NONE<!/RELATED>